import Mock from 'mockjs'
const subjects = ['语文', '数学', '英语', '物理', '化学', '生物', '政治', '历史', '地理']
var data = Mock.mock({
    'class|5-10': [
        {
            'id|+1': 1,
            'className': '@pick(["初一","初二","初三", "高一", "高二", "高三"]) @integer(1, 10)班',
            'teachers': subjects.map(subject => ({
                'id|+1': 100,
                'name': '@cname',
                'subject': subject
            })),
            'students|10-20': [
                {
                    'id|+1': 1,
                    'name': '@cname',
                    'age|10-18': 1
                }
            ]
        }
    ],
})
// 接口
Mock.mock('/lists', 'get', data.class)